cmake_minimum_required(VERSION 3.10)

project(my_exp)

set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR})
set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR})

if (CMAKE_BUILD_TYPE MATCHES "Debug")
  message("debug mode")
  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ggdb -std=c++11 -pthread ")
  set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ggdb -std=c99 -pthread ")
  add_definitions(-D_DEBUG_)
else()
  message("release mode")
  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O2 -std=c++11 -pthread ")
  set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O2 -std=c99 -pthread ")
endif (CMAKE_BUILD_TYPE MATCHES "Debug")

add_subdirectory(gene_code/)
add_subdirectory(src/)
add_subdirectory(test/)
